//
//  NSMainView.h
//  SpeedTest
//
//  Created by Han Mingjie on 2020/1/2.
//  Copyright © 2020 MingJie Han. All rights reserved.
//


#import "TargetConditionals.h"
#import "NSECGRealTimeOSControl.h"
#import "NSECGRealTimeController.h"
#import "UIECGRecordingView.h"


NS_ASSUME_NONNULL_BEGIN
@interface NSECGLinesView : UIView{
    UIColor *line_color;                //ECG line color.
    UIColor *lost_line_color;           //ECG color when lead have lost.
    UIFont *standard_text_font;
    id <NSECGRealTimeViewDelegate> delegate;
    NSArray <NSString *>* _Nullable ecg_name_array; //
    NSECGRealTimeView_Standard standard_style;
    NSECGRealTimeView_Style style;
    float x_speed;                      //纸速 默认 25.f 50.f 12.5f mm/s
    float y_rate;                      //振幅 默认 10.f 20.f 5.f  mm/mV
    float view_fresh;                   //ECG refreah Hz default 25.f
    float ECG_rate;                     //How many point per second from BLE about ECG default 660.f
    float pix_per_mm;                   //每个毫米是多少像素点 default 5.f
    NSUInteger space_pix;               //头尾距离像素数量，默认 30
    float line_width;                   //线条宽度
    NSECGRealTimeController *ecg_controller;
    float self_width;   //自身宽度，线程中调用
}
@property (nonatomic) UIColor *line_color;
@property (nonatomic) UIColor *standard_text_color;
@property (nonatomic) UIFont *standard_text_font;
@property (nonatomic) UIColor *lost_line_color;
@property (nonatomic) id <NSECGRealTimeViewDelegate> delegate;
@property (nonatomic) NSArray <NSString *>* _Nullable ecg_name_array;
@property (nonatomic) NSECGRealTimeView_Standard standard_style;
@property (nonatomic) NSECGRealTimeView_Style style;
@property (nonatomic) float x_speed;
@property (nonatomic) float y_rate;
@property (nonatomic) float view_fresh;
@property (nonatomic) float ECG_rate;
@property (nonatomic) float pix_per_mm;
@property (nonatomic) NSUInteger space_pix;
@property (nonatomic) float line_width;
@property (nonatomic) NSECGRealTimeController *ecg_controller;
@property (nonatomic) float self_width;

-(void)fresh_in_threadWithIndex:(NSUInteger)index;


-(void)cancelAllRefresh;
@end
NS_ASSUME_NONNULL_END
